// 项目查询参数
export interface ProjectQueryParams {
  pageIndex: number
  pageSize: number
  title: string
  status: string
  sectionTitle: string
}

// 项目列表项
export interface ProjectItem {
  pkid: string
  title: string
  sectionTitle: string
  remark: string
  status: 'draft' | 'published' | 'archived'
  createdTime: string
  updatedTime: string
  content?: any
}

// 新建项目表单
export interface CreateProjectForm {
  title: string
  sectionTitle: string
  remark: string
}

// API响应
export interface ApiResponse<T = any> {
  success: boolean
  message?: string
  data: T
}

// 项目列表响应
export interface ProjectListResponse {
  list: ProjectItem[]
  count: number
}

// 项目详情
export interface ProjectDetail extends ProjectItem {
  content: {
    pages: PageConfig[]
    settings: ProjectSettings
  }
}

// 页面配置
export interface PageConfig {
  id: string
  name: string
  components: ComponentConfig[]
}

// 组件配置
export interface ComponentConfig {
  id: string
  type: string
  name: string
  props: Record<string, any>
  style: Record<string, any>
  position: {
    x: number
    y: number
    width: number
    height: number
  }
}

// 项目设置
export interface ProjectSettings {
  theme: string
  layout: string
  background: string
}